package com.atguigu.springcloud.entities;

import com.atguigu.springcloud.enums.EnumEO;
import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;

/**
 * Created by luojie on 2018/9/7.
 */
@Data
@Entity
@Table(name = "ep_order_info")
@EntityListeners(AuditingEntityListener.class)
public class OrderInfo extends BaseEntity {

    @Column(name = "employee_id", nullable = false)
    private String employeeId;

    private String remark;

    @Column(nullable = false)
    private Integer amt;

    @Column(nullable = false)
    private EnumEO.OrderStatus status;


    @Override
    public String toString() {
        return "OrderInfo{" +
                "employeeId='" + employeeId + '\'' +
                ", remark='" + remark + '\'' +
                ", amt=" + amt +
                ", status=" + status +
                '}' + super.toString();
    }
}
